package com.hx.learn.mybatis.model;

import java.util.ArrayList;
import java.util.List;

/**
 * @author jxlgcmh
 * @date 2020-05-15 21:59
 * @description  用户
 */
public class User {
    private Integer id;
    private String username;
    /**
     *一个用户对应多篇文章
     */
    private List<Post> posts;

    public User() {
    }

    public User(Integer id, String username, List<Post> posts) {
        this.id = id;
        this.username = username;
        this.posts = posts;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public List<Post> getPosts() {
        return posts;
    }

    public void setPosts(List<Post> posts) {
        this.posts = posts;
    }
}
